package com.tul.exercise.base.thread.base;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * 执行 有休眠功能的任务
 */
public class SleepTask  {


    public static void main(String[] args) {
        ExecutorService exec = Executors.newCachedThreadPool();

        for (int i = 0; i < 5; i++) {
            exec.execute(new SleepLightOff());
        }

        exec.shutdown();
    }
}
